from typing import *


class Solution:
    def largeGroupPositions(self, s: str) -> List[List[int]]:
        ans = []
        l, r = 0, 1
        while r < len(s):
            if s[r] != s[r - 1]:
                if r - l >=3:
                    ans.append([l,r-1])
                l = r
            r+=1
        if r - l >=3:
            ans.append([l,r-1])
        return ans